namespace game {

    export namespace gameConfig {

        export class GameConfigModule extends mvc.Module {

            constructor() {
                super(GameConfigModule.NAME);
                module = this;
            }

            public listNotificationInterests(): string[] {
                return [common.Command.ENTER_GAME_LOADING];
            }

            public async handleNotification(note: mvc.Notification) {
                switch (note.name) {
                    case common.Command.ENTER_GAME_LOADING: //初始化模块
                        let progress = note.body;
                        progress.max++;
                        await Resource.loadResources();
                        ConfigDecode.init();
                        progress.current++;
                        // console.log('gameConfig', ConfigDecode.resources);
                        break;
                }
            }

            public static NAME = "gameConfig";
        }
        export var module: GameConfigModule = null;
    }
}